package com.glsc.ngateway.common.base.repo.postgre6;

import com.glsc.ngateway.common.base.domain.postgre6.TrsGtjaGzb;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface TrsGtjaGzbRepo extends JpaRepository<TrsGtjaGzb, TrsGtjaGzb.PK>, JpaSpecificationExecutor<TrsGtjaGzb> {

    @Transactional(rollbackFor = Exception.class)
    @Modifying
    @Query(value = "delete from glsc_data.t_excel_trs_gtja_gzb where fc_date = :date", nativeQuery = true)
    void delete(@Param("date") String date);
}
